<div class="toolbar_buttons">
  <% if can? :create, Alchemy::Picture %>
    <div class="toolbar_button">
      <%= render 'alchemy/admin/uploader/button',
        object: Alchemy::Picture.new,
        dropzone: '#assign_image_list',
        file_attribute: 'image_file',
        in_dialog: true,
        redirect_url: alchemy.admin_pictures_path(
          size: search_filter_params[:size],
          q: { last_upload: true },
          form_field_id: @form_field_id
        ) %>
    </div>
    <div class="toolbar_spacer"></div>
  <% end %>
  <div class="button_group">
    <sl-tooltip content="<%= Alchemy.t(:small_thumbnails) %>">
      <%= link_to(
        render_icon('zoom-out'),
        alchemy.admin_pictures_path(
          search_filter_params.merge(
            size: "small",
            form_field_id: @form_field_id
          )
        ),
        class: "icon_button"
      ) %>
    </sl-tooltip>
    <sl-tooltip content="<%= Alchemy.t(:medium_thumbnails) %>">
      <%= link_to(
        render_icon('search'),
        alchemy.admin_pictures_path(
          search_filter_params.merge(
            size: "medium",
            form_field_id: @form_field_id
          )
        ),
        class: "icon_button"
      ) %>
    </sl-tooltip>
    <sl-tooltip content="<%= Alchemy.t(:big_thumbnails) %>">
      <%= link_to(
        render_icon('zoom-in'),
        alchemy.admin_pictures_path(
          search_filter_params.merge(
            size: "large",
            form_field_id: @form_field_id
          )
        ),
        class: "icon_button"
      ) %>
    </sl-tooltip>
  </div>
</div>
